package com.ruoyi.rsikManage.service.Impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.rsikManage.mapper.TMonitoringEquipmentMapper;
import com.ruoyi.rsikManage.domain.TMonitoringEquipment;
import com.ruoyi.rsikManage.service.ITMonitoringEquipmentService;

/**
 * 监控设备列表Service业务层处理
 *
 * @author sxygsj
 * @date 2024-06-24
 */
@Service
public class TMonitoringEquipmentServiceImpl implements ITMonitoringEquipmentService
{
    @Autowired
    private TMonitoringEquipmentMapper tMonitoringEquipmentMapper;

    /**
     * 查询监控设备列表
     *
     * @param id 监控设备列表主键
     * @return 监控设备列表
     */
    @Override
    public TMonitoringEquipment selectTMonitoringEquipmentById(Long id)
    {
        return tMonitoringEquipmentMapper.selectTMonitoringEquipmentById(id);
    }

    /**
     * 查询监控设备列表列表
     *
     * @param tMonitoringEquipment 监控设备列表
     * @return 监控设备列表
     */
    @Override
    public List<TMonitoringEquipment> selectTMonitoringEquipmentList(TMonitoringEquipment tMonitoringEquipment)
    {
        return tMonitoringEquipmentMapper.selectTMonitoringEquipmentList(tMonitoringEquipment);
    }

    /**
     * 新增监控设备列表
     *
     * @param tMonitoringEquipment 监控设备列表
     * @return 结果
     */
    @Override
    public int insertTMonitoringEquipment(TMonitoringEquipment tMonitoringEquipment)
    {
        tMonitoringEquipment.setCreateTime(DateUtils.getNowDate());
        return tMonitoringEquipmentMapper.insertTMonitoringEquipment(tMonitoringEquipment);
    }

    /**
     * 修改监控设备列表
     *
     * @param tMonitoringEquipment 监控设备列表
     * @return 结果
     */
    @Override
    public int updateTMonitoringEquipment(TMonitoringEquipment tMonitoringEquipment)
    {
        return tMonitoringEquipmentMapper.updateTMonitoringEquipment(tMonitoringEquipment);
    }

    /**
     * 批量删除监控设备列表
     *
     * @param ids 需要删除的监控设备列表主键
     * @return 结果
     */
    @Override
    public int deleteTMonitoringEquipmentByIds(Long[] ids)
    {
        return tMonitoringEquipmentMapper.deleteTMonitoringEquipmentByIds(ids);
    }

    /**
     * 删除监控设备列表信息
     *
     * @param id 监控设备列表主键
     * @return 结果
     */
    @Override
    public int deleteTMonitoringEquipmentById(Long id)
    {
        return tMonitoringEquipmentMapper.deleteTMonitoringEquipmentById(id);
    }
}
